"use strict";
var ashade={},
$ashade_html=jQuery('html'),
ashade_tns=[],
$ashade_body=jQuery('body'),
$ashade_window=jQuery(window),
$ashade_header=jQuery('header#ashade-header'),
$ashade_footer=jQuery('footer#ashade-footer'),
$ashade_main=jQuery('main.ashade-content-wrap'),
$ashade_scroll=jQuery('.ashade-content-scroll'),
$ashade_header_holder,
ashade_f_grid=[];
ashade.config={
'smooth_ease':0.1,
'content_load_delay': 0.8,
'header_scroll': false,
'referrer':document.referrer,
'location':jQuery(location).attr('href'),
'home_link':false
}
function ashade_inView(this_el){
var rect=this_el.getBoundingClientRect()
return (
(rect.height > 0||rect.width > 0) &&
rect.bottom >=0 &&
rect.right >=0 &&
rect.top <=(window.innerHeight||document.documentElement.clientHeight) &&
rect.left <=(window.innerWidth||document.documentElement.clientWidth)
)
}
if($ashade_body.hasClass('ashade-header-scrollable')){
ashade.config.header_scroll=true;
var $ashade_header_inner=$ashade_header.children('.ashade-header-inner');
}
if($ashade_body.hasClass('ashade-home-template')){
var ashade_landing={
get_event: function(){
let this_event=false;
if(window.location.href.indexOf('?event=') > -1){
this_event=window.location.href.split('?event=')[1];
}else if(window.location.href.indexOf('?page_id=') > -1&&window.location.href.indexOf('&event=') > -1){
this_event=window.location.href.split('&event=')[1];
}
return this_event;
},
get_location: function(){
let this_url=false;
if(window.location.href.indexOf('?event=') > -1){
this_url=window.location.href.split('?event=')[0];
}else if(window.location.href.indexOf('?page_id=') > -1&&window.location.href.indexOf('&event=') > -1){
this_url=window.location.href.split('&event=')[0];
}
return this_url;
},
get_event_url: function(event){
let this_event_url=false;
if(window.location.href.indexOf('?page_id=') > -1){
this_event_url=window.location.href+'&event='+event;
}else{
this_event_url=window.location.href+'?event='+event;
}
return this_event_url;
}}
}else{
ashade_landing=false;
}
ashade.link_exception=function($this){
let classes=[
'comment-reply-link',
'ajax_add_to_cart',
'remove'
],
ids=[
'cancel-comment-reply-link'
],
result=false;
classes.forEach(function(this_class){
if($this.hasClass(this_class)){
result=true;
}});
ids.forEach(function(this_id){
if($this.attr('id')==this_id) result=true;
});
return result;
}
class Ashade_Filtered_Grid {
constructor(this_obj){
let this_class=this;
if(!this_obj){
return false;
}
if(this_obj instanceof jQuery){
this.$el=this_obj;
}else{
this.$el=jQuery(this_obj);
}
if(this.$el.hasClass('ashade-gallery-adjusted')){
this.type='adjusted';
}else{
this.type='grid';
}
this.id=this.$el.attr('id');
this.$filter=jQuery('.ashade-filter-wrap[data-id="'+ this.id +'"]');
if(! this.$filter.find('.ashade-mobile-filter-wrap').length){
this.init_mobile_filter=true;
this.$filter_mobile_wrap=jQuery('
').appendTo(this.$filter);
this.$filter_mobile=jQuery('').appendTo(this.$filter_mobile_wrap);
this.$filter_mobile.append(''+this.$filter.data('label')+'');
this.$filter_mobile_value=jQuery(''+ this.$filter.find('a.is-active').text() +'').appendTo(this.$filter_mobile);
this.$filter_mobile_list=jQuery('').insertAfter(this.$filter_mobile).slideUp(1);
this.$filter_mobile_wrap.append('\
');
}else{
this.init_mobile_filter=false;
}
this.$filter.children('a').each(function(){
let $this_a=jQuery(this),
this_li=jQuery(''+ $this_a.text() +'').appendTo(this_class.$filter_mobile_list);
this_li.on('click', function(e){
e.preventDefault();
let $this=jQuery(this),
category=$this.data('category'),
label=$this.text();
this_class.set(category,label);
});
});
this.$filter.children('a.is-active').each(function(){
let category=jQuery(this).data('category'),
label=jQuery(this).text();
if(this.init_mobile_filter){
this_class.$filter_mobile_list.find('[data-category="' + category + '"]').addClass('is-active');
this_class.$filter_mobile_value.text(label);
}});
this.$el.addClass('ashade-grid-filtered');
this_class.layout();
this.$filter.on('click', 'a', function(e){
e.preventDefault();
let $this=jQuery(this),
category=$this.data('category'),
label=$this.text();
this_class.set(category,label);
});
if(this.init_mobile_filter){
this.$filter_mobile.on('click', function(){
jQuery(this).parents('.ashade-filter-wrap').toggleClass('is-open');
this_class.$filter_mobile_list.slideToggle(300);
});
}
jQuery(window)
.on('resize', function(){
this_class.layout();
})
.on('load', function(){
this_class.layout();
});
}
set(category, label){
let this_class=this;
this_class.$filter.find('.is-active').removeClass('is-active');
this_class.$filter.find('[data-category="' + category + '"]').addClass('is-active');
this_class.$el.children('div').removeClass('ashade-grid-item-hidden');
this_class.$el.children('div:not(' + category + ')').addClass('ashade-grid-item-hidden');
this_class.$filter_mobile_value.text(label);
this_class.$filter.removeClass('is-open');
this_class.$filter_mobile_list.slideUp(300);
this_class.layout();
}
layout(){
let this_class=this,
count=0,
row_height=0,
container_height=0,
$items=this.$el.children('div:not(.ashade-grid-item-hidden)'),
spacing_x=parseInt($items.css('margin-left'), 10) + parseInt($items.css('margin-right'), 10),
spacing_y=parseInt($items.css('margin-top'), 10) + parseInt($items.css('margin-bottom'), 10),
item_width=$items.width() + spacing_x,
columns=Math.round(this.$el.width()/item_width);
if('adjusted'==this.type){
var current_row=[];
}
$items.each(function(){
let $this=jQuery(this),
this_height=$this.height() + spacing_y,
setX=item_width*count,
setY=container_height;
if(this_height > row_height){
row_height=this_height;
}
$this.css('transform', 'translate3d('+ setX +'px, '+ setY +'px, 0) scale(1,1)');
if('adjusted'==this_class.type){
current_row.push({
index: jQuery(this).index(),
xPos: setX,
yPos: setY,
});
}
count++
if(count >=columns){
count=0;
container_height +=row_height;
if('adjusted'==this_class.type){
let rowItemHeight=row_height - spacing_y;
jQuery(current_row).each(function(){
let $current=this_class.$el.children('div:eq('+this.index+')');
if($current.height() < rowItemHeight){
let newY=this.yPos + ((rowItemHeight - $current.height())/2);
$current.css('transform', 'translate3d('+ this.xPos +'px, '+ newY +'px, 0) scale(1,1)');
}});
current_row.length=0;
}
row_height=0;
}});
if(count > 0){
container_height +=row_height;
if('adjusted'==this_class.type){
let rowItemHeight=row_height - spacing_y;
jQuery(current_row).each(function(){
let $current=this_class.$el.children('div:eq('+this.index+')');
if($current.height() < rowItemHeight){
let newY=this.yPos + ((rowItemHeight - $current.height())/2);
$current.css('transform', 'translate3d('+ this.xPos +'px, '+ newY +'px, 0) scale(1,1)');
}});
current_row.length=0;
}}
this.$el.height(container_height);
if($ashade_body.hasClass('ashade-home-template')&&$ashade_body.hasClass('ashade-smooth-scroll')){
ashade.sScroll.layout();
}}
}
ashade.cursor={
$el:jQuery('.ashade-cursor'),
$el_main:jQuery('span.ashade-cursor-circle'),
targetX: $ashade_window.width()/2,
targetY: $ashade_window.height()/2,
currentX: $ashade_window.width()/2,
currentY: $ashade_window.height()/2,
easing: 0.2,
init:function(){
let $this_el=this.$el;
$ashade_window.on('mousemove', function(e){
ashade.cursor.targetX=e.clientX - $this_el.width()/2;
ashade.cursor.targetY=e.clientY - $this_el.height()/2;
});
if($this_el.length){
ashade.cursor.animate();
}
$ashade_window.on('mouseleave', function(){
ashade.cursor.$el.addClass('is-inactive');
}).on('mouseenter', function(){
ashade.cursor.$el.removeClass('is-inactive');
});
jQuery(document).on('mouseenter', 'a', function(){
if(jQuery(this).hasClass('ashade-lightbox-link')){
ashade.cursor.$el.addClass('int-lightbox');
}else{
ashade.cursor.$el.addClass('int-link');
}
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-link int-lightbox');
});
}).on('mouseenter', 'a', function(){
if(jQuery(this).hasClass('shadowcore-lightbox-link')){
ashade.cursor.$el.addClass('int-lightbox');
}else{
ashade.cursor.$el.addClass('int-link');
}
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-link int-lightbox');
});
}).on('mouseenter', 'button', function(){
ashade.cursor.$el.addClass('int-link');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-link');
});
}).on('mouseenter', 'input[type="submit"]', function(){
ashade.cursor.$el.addClass('int-link');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-link');
});
}).on('mouseenter', '.ashade-back', function(){
jQuery('.ashade-back').on('mouseenter', function(){
ashade.cursor.$el.addClass('int-link');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-link');
});
});
}).on('mouseenter', '.is-link', function(){
jQuery('.is-link').on('mouseenter', function(){
ashade.cursor.$el.addClass('int-link');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-link');
});
});
}).on('mouseenter', '.ashade-aside-overlay', function(){
ashade.cursor.$el.addClass('int-close');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-close');
});
}).on('mouseenter', '.ashade-categories-overlay', function(){
ashade.cursor.$el.addClass('int-close');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-close');
});
}).on('mouseenter', '.shadowcore-before-after', function(){
ashade.cursor.$el.addClass('int-grab-h');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-grab-h');
});
}).on('mouseenter', '.shadowcore-testimonials-carousel .tns-inner', function(){
ashade.cursor.$el.addClass('int-grab-h');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-grab-h');
});
}).on('mouseenter', '.ashade-albums-slider-wrap:not(.is-single) .ashade-albums-slider', function(){
ashade.cursor.$el.addClass('int-grab-h');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-grab-h');
});
}).on('mouseenter', '.pswp__scroll-wrap', function(){
ashade.cursor.$el.addClass('int-grab-h');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-grab-h');
});
}).on('mouseenter', '.price_slider.ui-slider-horizontal', function(){
ashade.cursor.$el.addClass('int-grab-h');
jQuery(this).on('mouseleave', function(){
ashade.cursor.$el.removeClass('int-grab-h');
});
}).on('mouseenter', '.ashade-albums-carousel', function(){
let $this=jQuery(this);
if($this.parent().hasClass('is-centered')){
ashade.cursor.$el.removeClass('int-grab-h int-grab-v');
}
if(! $this.parent().hasClass('is-centered')){
if($this.hasClass('is-vertical')){
ashade.cursor.$el.addClass('int-grab-v');
}else{
ashade.cursor.$el.addClass('int-grab-h');
}}
$this.on('mouseleave', function(){
if(! $this.parent().hasClass('is-centered')){
ashade.cursor.$el.removeClass('int-grab-h int-grab-v');
}});
}).on('mouseenter', 'iframe', function(){
ashade.cursor.$el.addClass('int-iframe');
}).on('mouseleave', 'iframe', function(){
ashade.cursor.$el.removeClass('int-iframe');
});
},
animate: function(){
let $this_el=ashade.cursor.$el;
ashade.cursor.currentX +=((ashade.cursor.targetX - ashade.cursor.currentX) * ashade.cursor.easing);
ashade.cursor.currentY +=((ashade.cursor.targetY - ashade.cursor.currentY) * ashade.cursor.easing);
$this_el.css('transform', 'translate3d('+ ashade.cursor.currentX +'px, '+ ashade.cursor.currentY +'px, 0)');
requestAnimationFrame(ashade.cursor.animate);
}};
ashade.cursor.init();
if(jQuery('.ashade-lightbox-link').length||jQuery('.shadowcore-lightbox-link').length){
ashade.pswp={
getMaxHeight:function(){
let maxHeight=$ashade_window.height();
if(jQuery('.pswp__caption').length){
maxHeight=maxHeight - jQuery('.pswp__caption').height();
}
if(jQuery('.pswp__top-bar').length){
let $top_bar=jQuery('.pswp__top-bar'),
top_bar_height=$top_bar.height() + parseInt($top_bar.css('padding-top'), 10) + parseInt($top_bar.css('padding-bottom'), 10);
if(jQuery('.pswp__caption').length){
maxHeight=maxHeight - top_bar_height;
}else{
maxHeight=maxHeight - top_bar_height*2;
}}
return maxHeight;
},
resizeVideo:function(){
let result={};
if($ashade_window.width()/16 > this.getMaxHeight()/9){
result.w=this.getMaxHeight() * 1.7778 * 0.8;
result.h=this.getMaxHeight() * 0.8;
}else{
result.w=$ashade_window.width() * 0.8;
result.h=$ashade_window.width() * 0.5625 * 0.8;
}
return result;
},
gallery:Array(),
html:jQuery('\
\
').appendTo($ashade_body)
};}
ashade.count_down={
init:function(){
let $dom=jQuery('#ashade-coming-soon'),
datetime=new Date($dom.find('time').text() + 'T00:00:00'),
is_this;
$dom.find('time').remove();
this.labels=$dom.data('labels');
this.days=jQuery('0
')
.appendTo($dom).wrap('')
.after(''+ ashade.count_down.labels[0] +'');
this.hours=jQuery('0
')
.appendTo($dom).wrap('')
.after(''+ ashade.count_down.labels[1] +'');
this.minutes=jQuery('0
')
.appendTo($dom).wrap('')
.after(''+ ashade.count_down.labels[2] +'');
this.seconds=jQuery('0
')
.appendTo($dom).wrap('')
.after(''+ ashade.count_down.labels[3] +'');
this.update(datetime);
if(this.interval){
clearInterval(this.interval);
}
this.interval=setInterval(function(){
ashade.count_down.update(datetime);
}, 1000);
},
update:function(endDate){
let now=new Date();
let difference=endDate.getTime() - now.getTime();
if(difference <=0){
clearInterval(this.interval);
}else{
let seconds=Math.floor(difference / 1000);
let minutes=Math.floor(seconds / 60);
let hours=Math.floor(minutes / 60);
let days=Math.floor(hours / 24);
hours %=24;
minutes %=60;
seconds %=60;
if(days < 10){
days=("0" + days).slice(-2);
}
this.days.text(days);
this.hours.text(("0" + hours).slice(-2));
this.minutes.text(("0" + minutes).slice(-2));
this.seconds.text(("0" + seconds).slice(-2));
}}
};
class Ashade_Lazy {
constructor(this_class){
let classVar=this;
const images=document.querySelectorAll(this_class);
const options={};
if('IntersectionObserver' in window){
classVar.imgObserver=new IntersectionObserver((entries)=> {
entries.forEach((entry)=> {
if(!entry.isIntersecting){
return;
}else{
classVar.preloadImage(entry.target);
classVar.imgObserver.unobserve(entry.target);
}});
}, options);
images.forEach(image=> {
classVar.imgObserver.observe(image);
});
}else{
if($ashade_body.hasClass('ashade-albums-template--ribbon')){
if(jQuery(this_class + ':not(.is-loaded)').length){
jQuery(this_class + ':not(.is-loaded)').each(function(){
classVar.preloadImage(this);
});
}}else{
if(jQuery(this_class + ':not(.is-loaded)').length){
jQuery(this_class + ':not(.is-loaded)').each(function(){
if(classVar.inView(this)){
classVar.preloadImage(this);
}});
}
$ashade_window.on('scroll', function(){
if(jQuery(this_class + ':not(.is-loaded)').length){
jQuery(this_class + ':not(.is-loaded)').each(function(){
if(classVar.inView(this)){
classVar.preloadImage(this);
}});
}});
}}
}
inView(this_el){
var rect=this_el.getBoundingClientRect()
return (
(rect.height > 0||rect.width > 0) &&
rect.bottom >=0 &&
rect.right >=0 &&
rect.top <=(window.innerHeight||document.documentElement.clientHeight) &&
rect.left <=(window.innerWidth||document.documentElement.clientWidth)
)
}
preloadImage(this_img){
const src=this_img.getAttribute('data-src');
if(!src){
console.log('Can not load image. No image src defined.');
return
}
this_img.src=src;
this_img.addEventListener("load", function(e){
e.target.classList.add('is-loaded');
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1){
if(jQuery(this_img).parents('div').hasClass('ashade-justified-gallery')){
setTimeout(function(){
jQuery(this_img).parent('a').addClass('is-ready');
}, 100, this_img);
setTimeout(function(){
jQuery(this_img).parents('.ashade-justified-gallery').justifiedGallery();
}, 500, this_img);
}}
});
}}
if('IntersectionObserver' in window){}else{
var ashade_lazy_old={
inView: function(this_el){
var rect=this_el.getBoundingClientRect()
return (
(rect.height > 0||rect.width > 0) &&
rect.bottom >=0 &&
rect.right >=0 &&
rect.top <=(window.innerHeight||document.documentElement.clientHeight) &&
rect.left <=(window.innerWidth||document.documentElement.clientWidth)
)
},
preloadImage: function(this_img){
const src=this_img.getAttribute('data-src');
if(!src){
console.log('Can not load image. No image src defined.');
return
}
this_img.src=src;
this_img.addEventListener("load", function(e){
e.target.classList.add('is-loaded');
});
}}
}
if(jQuery('.ashade-kenburns-slider').length){
ashade.kenburns={
init: function(){
let this_f=this;
this_f.$el=jQuery('.ashade-kenburns-slider');
this_f.items=this_f.$el.find('.ashade-kenburns-slide').length;
this_f.transition=parseInt(this_f.$el.data('transition'),10);
this_f.delay=parseInt(this_f.$el.data('delay'), 10)/1000 + this_f.transition*0.001;
this_f.zoom=this_f.$el.data('zoom');
this_f.from=this_f.zoom;
this_f.to=1;
this_f.active=0;
let prev_offset_x=0,
prev_offset_y=0;
this_f.$el.find('.ashade-kenburns-slide').each(function(){
let offset_x=Math.random() * 100,
offset_y=Math.random() * 100;
if(prev_offset_x > 50&&offset_x > 50){
offset_x=offset_x - 50;
}else if(prev_offset_x < 50&&offset_x < 50){
offset_x=offset_x + 50;
}
if(prev_offset_y > 50&&offset_y > 50){
offset_y=offset_y - 50;
}else if(prev_offset_y < 50&&offset_y < 50){
offset_y=offset_y + 50;
}
prev_offset_x=offset_x;
prev_offset_y=offset_y;
jQuery(this).css({
'transition':'opacity ' + this_f.transition + 'ms',
'transform-origin':offset_x + '% ' + offset_y + '%',
'background-image':'url('+ jQuery(this).data('src')+')'
});
});
ashade.kenburns.change();
},
change: function(){
let this_f=this,
scale_from=this_f.from,
scale_to=this_f.to;
if(this_f.active >=this_f.items){
this_f.active=0;
}
let current_slide=this_f.$el.find('.ashade-kenburns-slide').eq(this_f.active);
gsap.fromTo(current_slide, {
scale: scale_from,
onStart: function(){
current_slide.addClass('is-active');
}},
{
scale: scale_to,
duration: this_f.delay,
ease: 'none',
onComplete: function(){
ashade.kenburns.active++;
ashade.kenburns.from=scale_to;
ashade.kenburns.to=scale_from;
ashade.kenburns.change();
ashade.kenburns.$el.find('.is-active').removeClass('is-active');
}});
}};}
ashade.counter=function(this_el){
jQuery(this_el).prop('Counter', 0).animate({
Counter: jQuery(this_el).text()
}, {
duration: parseInt(jQuery(this_el).parent().data('delay'), 10),
easing: 'swing',
step: function (now){
jQuery(this_el).text(Math.ceil(now));
}});
}
ashade.old_scroll_top=0;
if($ashade_body.hasClass('ashade-smooth-scroll')){
ashade.sScroll={
target: 0,
current: 0,
animate: function(){
ashade.sScroll.current +=((ashade.sScroll.target - ashade.sScroll.current) * ashade.config.smooth_ease);
$ashade_scroll.css('transform', 'translate3d(0, -'+ ashade.sScroll.current +'px, 0)');
if(ashade.config.header_scroll){
$ashade_header_inner.css('transform', 'translate3d(0, -'+ ashade.sScroll.current +'px, 0)');
}
if(jQuery('.wp-block-cover-image.has-parallax').length){
jQuery('.wp-block-cover-image.has-parallax').each(function(){
let $this=jQuery(this),
this_speed=50,
this_offset_top=$this.offset().top,
current_scroll=($ashade_window.scrollTop() - this_offset_top)/100,
set_top=current_scroll*100 - current_scroll*this_speed;
$this.css('background-position', 'center '+ set_top +'px');
});
}
if(jQuery('.wp-block-cover.has-parallax').length){
jQuery('.wp-block-cover.has-parallax').each(function(){
let $this=jQuery(this),
this_speed=50,
this_offset_top=$this.offset().top,
current_scroll=($ashade_window.scrollTop() - this_offset_top)/100,
set_top=current_scroll*100 - current_scroll*this_speed;
$this.css('background-position', 'center '+ set_top +'px');
});
}
if(!$ashade_body.hasClass('ashade-home-template')){
if($ashade_body.hasClass('admin-bar')){
if($ashade_scroll.height()!==($ashade_body.height() + jQuery('#wpadminbar').height())){
ashade.sScroll.layout();
}}else{
if($ashade_scroll.height()!==$ashade_body.height()){
ashade.sScroll.layout();
}}
}
requestAnimationFrame(ashade.sScroll.animate);
},
layout: function(){
if('IntersectionObserver' in window){}else{
if(!$ashade_body.hasClass('ashade-albums-template--ribbon')){
if(jQuery('img.ashade-lazy:not(.is-loaded)').length){
jQuery('img.ashade-lazy:not(.is-loaded)').each(function(){
if(ashade_lazy_old.inView(this)){
ashade_lazy_old.preloadImage(this);
}});
}}
}
if($ashade_scroll.length){
let this_content=$ashade_scroll.children('.ashade-content');
this_content.css('min-height', '0px');
if($ashade_scroll.height() <=$ashade_window.height()){
let min_height=$ashade_window.height() - $ashade_footer.height();
if(!$ashade_body.hasClass('no-header-padding'))
min_height=min_height - $ashade_scroll.children('.ashade-header-holder').height();
if($ashade_body.hasClass('ashade-layout--horizontal')){
if(jQuery('.ashade-to-top-wrap.ashade-back-wrap').length){
min_height=min_height - jQuery('.ashade-to-top-wrap.ashade-back-wrap').height();
}
if(jQuery('.ashade-page-title-wrap').length){
min_height=min_height - jQuery('.ashade-page-title-wrap').height();
}}
this_content.css('min-height', min_height+'px');
$ashade_scroll.addClass('is-centered');
}else{
$ashade_scroll.removeClass('is-centered');
}
if($ashade_window.width() > 960){
if(jQuery('#wpadminbar').length){
$ashade_body.height($ashade_scroll.height() - jQuery('#wpadminbar').height());
}else{
$ashade_body.height($ashade_scroll.height());
}}else{
$ashade_body.height($ashade_scroll.height());
}}
}};
if($ashade_scroll.length||$ashade_body.hasClass('ashade-home-template')){
ashade.sScroll.animate();
}}
ashade.init=function(){
jQuery('a[href="#"]').each(function(){
jQuery(this).attr('href', 'javascript:void(0)');
});
if(ashade.config.referrer!==''&&ashade.config.referrer!==ashade.config.location&&window.history.length > 1){
$ashade_body.addClass('has-history');
}else{
$ashade_body.addClass('no-history');
}
$ashade_body.addClass('is-init');
ashade.config.fade_point=parseInt($ashade_header.data('fade-point'),10);
if(!ashade.config.fade_point) ashade.config.fade_point=0;
if($ashade_window.scrollTop() > ashade.config.fade_point){
$ashade_header.addClass('is-faded');
}else{
$ashade_header.removeClass('is-faded');
}
if(jQuery('#ashade-coming-soon').length){
ashade.count_down.init();
}
if($ashade_body.hasClass('ashade-rcp')){
jQuery(document).on('contextmenu', function (e){
e.preventDefault();
if(jQuery('.ashade-rcp-message-wrap').length){
alert(jQuery('.ashade-rcp-message-wrap').text());
}});
}
if($ashade_body.hasClass('ashade-idp')){
jQuery('a').on('mousedown', function (e){
e.preventDefault();
});
jQuery('.ashade-content img').on('mousedown', function (e){
e.preventDefault();
});
}
if(jQuery('.ashade-page-background[data-src]').length){
jQuery('.ashade-page-background[data-src]').each(function(){
jQuery(this).css('background-image', 'url('+ jQuery(this).data('src') +')');
if(jQuery(this).attr('data-opacity'))
jQuery(this).css('opacity', jQuery(this).data('opacity'));
});
}
if($ashade_body.hasClass('admin-bar')){
$ashade_html.addClass('has-admin-bar');
}else{
$ashade_html.addClass('no-admin-bar');
}
ashade.old_scroll_top=$ashade_window.scrollTop();
if(jQuery('.ashade-404-background').length){
$ashade_body.addClass('is-404-page');
}
if(jQuery('.ashade-protected-form-wrap').length){
let $protected_wrap=jQuery('.ashade-protected-form-wrap'),
$protected_form=jQuery('.ashade-protected-form-wrap > form'),
$protected_form_inner=jQuery('